Bluetooth Scanning - [Oyster Edge]
Table of Contents
The Oyster Edge has a 5.2 Bluetooth® Low Energy (BLE) module. This enables a large number of flexible solutions to be implemented using the Oyster Edge + 3rd party BLE Tags or Sensors.
See Bluetooth Asset Tracking for an overview.
This guide covers how to configure the device to scan periodically for BLE Tags and sensors.
Setting the Bluetooth® Firmware
If you have just booted the device for the first time, it is likely that it has production level Bluetooth® firmware installed and you'll need to upgrade the firmware.
1. First select the device in the device grid,
2. Open the Device Operations drop down menu
3. Select 'set Bluetooth® firmware'
To check which hardware revision you have, consult the device grid under the 'Product' column which will show a number and a decimal, the decimal is the hardware revision. I.e. 96.1 is revision 1. Set the latest Bluetooth® firmware version.
It is also worth setting the main device firmware at the same time.
Configure Scanning Parameters
Add the BLE Tag Scanning tab.
BLE scanning is disabled until we set a Scan Period (in trip or out of trip)
We can control scan periods and upload behaviour when the device is in/out of trip. We may want to scan more often while the device is on the move if we are more likely to encounter tags during a trip. It could then be scaled back when the asset is parked overnight.
Choosing a Scan Length
When choosing the scan length for your Bluetooth® tag you are balancing the power usage and accuracy. If the scan is too short you may miss nearby tags but if it is too long you are wasting power.
In our testing, we have found it is best to configure the scan length to 3 times the tag beacon interval. So if our tags beacon every 5 seconds, we should set the scan length to at least 15 seconds.
Example Configuration
Below shows parameters for:
- Scanning for iBeacon Tags
- Scanning every 15 minutes during trip (and on the start/end)
- Scanning and uploading every 2 hours out of trip
- If Upload on Scan is set to No - When a scan is conducted, the device will simply scan for BLE tags. The GPS coordinate that is sent in the payload with the scan data is the previously logged position
- If Upload on Scan is set to Yes, the following occurs instead
- The scan is logged
- A Location Scan is conducted
- An upload is attempted
- If we are already uploading and getting regular positions during a trip - we don't also need to configure Upload on In Trip Scan
- Data will be upload along with the "In Trip Upload" period
- The regular fixes will ensure we have current location scan data associated with tag scan data.
With this in mind, if the above scanning parameters were configured in addition to the default tracking parameters:
The behaviour is as follows:
- Device sitting stationary
- Scan, GPS fix and upload every 2 hours
- Device is on move
- Trip starts
- Scan, fix + upload (trip start upload)
- In Trip
- GPS fixes for position every 2 min
- BLE Scan every 15 min
- The results uploaded every 30 min (In Trip Uploads period = 1800 sec)
- Trip Ends
- Scan, fix + upload (trip end upload)
- Trip starts
There is no need to configure specific in-trip BLE uploads.
Testing/Troubleshooting Notes
When setting up a new tag type for the first time, take note of the following:
- It generally makes sense to set a short Heartbeat and In-Trip/Out of Trip Scan Periods - say about 10 minutes - so we get lots of regular scans for testing. We can extend these intervals back to what we will deploy in the field once we have confirmed the tag is being read.
- If tags are not being read, we can troubleshoot as follows:
- Double check all parameters. Ensure we have set a reasonable Scan Length
- Scan for the tag with your mobile phone - to double check that it is in-fact working and transmitting.
- Turn on Data Capturing on OEM. This will display the results of the tag scans in the logs in OEM - in case they're being filtered out by the end server.
- Contact support if we still cannot get it running.